home *** CD-ROM | disk | FTP | other *** search
/ Enciclopedia Del Perro / Enciclopedia Del Perro.iso / win / tfw115c1 / tfw.5 / SCRNWIP.SLT < prev    next >
Text File  |  1996-04-15  |  2KB  |  45 lines

  1. /****************************************************************/
  2. /*                                                              */
  3. /*  Demo of how to clear the screen in a novel way.             */
  4. /*                                                              */
  5. /*                   Copyright 1995 deltaComm Development, Inc. */
  6. /*                                                              */
  7. /****************************************************************/
  8.  
  9. main()
  10. {
  11. int width, height;
  12. int i;
  13.  
  14. if (argcount<= 0)                   // if the script wasn't told the screen dim.
  15.  {
  16.   width=gettermwidth();
  17.   height=gettermheight();
  18.  }
  19. else
  20.  {
  21.   // get width & height from parameters -- not currently supported in SALT.
  22.  }
  23.  
  24. flushbuf();                        // remove extraneous chars from comm buffers
  25. cursor_onoff(0);                   // turn the cursor off
  26.  
  27. for (i=0; i < (height/2); ++i)
  28.   {                                // Draw boxes to fill the screen w/ blanks
  29.    box(i, i, width-1-i, height-1-i, 2, 1, random(6)+1);
  30.    update_term();
  31.    delay_scr(1);                   // A short delay to help the effect
  32.   }
  33.  
  34. for (i=(height-1)/2; i>=0; --i)
  35.   {                                // scroll the boxes off the screen
  36.    scroll(0, 0, width-1, i, 1, 0);
  37.    scroll(0, height-1-i, width-1, height-1, -1, 0);
  38.    delay(1);
  39.   }
  40.  
  41. clear_scr();                       // Clear screen completely, just in case..
  42. cursor_onoff(1);                   // Show cursor
  43.  
  44. }
  45.